package com.laolei.template.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class TestController {

	@GetMapping("/freemarker")  ModelAndView gofreemarker() {
		System.err.println("访问/freemarker到达:"+System.currentTimeMillis());
		ModelAndView mv = new ModelAndView("/mvc/freemarker");
		mv.addObject("name", "参数Name--- freemarker");
		return mv;
	}
	
	@GetMapping("/thymeleaf")  ModelAndView gothymeleaf() {
		System.err.println("访问/thymeleaf到达:"+System.currentTimeMillis());
		ModelAndView mv = new ModelAndView("/mvc/thymeleaf");
		mv.addObject("name", "参数Name--- thymeleaf");
		return mv;
	}
	
	@GetMapping("/mustache")  ModelAndView gomustache() {
		System.err.println("访问/mustache到达:"+System.currentTimeMillis());
		ModelAndView mv = new ModelAndView("/mvc/mustache");
		mv.addObject("name", "参数Name---mustache");
		return mv;
	}
	
}
